<?php 
	include('function/connection.php');
	// Select customer info
	if(isset($_GET['id'])){
		
		$id = $_REQUEST["id"];
		//select record to update
		$sql_sel="SELECT * FROM tbl_sales WHERE id='$id'";
		$result_sel=query($sql_sel);
		$row_sel=fetch_assoc($result_sel);
		
		$id_select=$row_sel['id'];
		$sale_id=$row_sel['sale_id'];
		$pd_name=$row_sel['pd_name'];
		$qty=$row_sel['qty'];
	}
?>
<form action="index.php?page=sale_list&action=sale_list_detail&sale_id_detail=<?php echo $sale_id; ?>" method="post" >
	<table class="bordered" width="770">
        <thead>
            <tr>
                <th>Please type your quality to return:<br /><span class="red">* require feild</span></th>
            </tr>
        </thead>
        <tr>
    	<?php 
			if(isset($_REQUEST['msgStatus']))
				echo " <td ><span class='red'>". $_REQUEST['msgStatus']."</span></td>";
		?>
    </tr>
	</table>
    <table class="bordered" width="770">
		<tr>
        	<td>
            	<label> Product:</label>
            </td>
			<td >
            	<input type="hidden" class="txtID" name="txtid" value="<?php echo $id;?>" />
				<input type="hidden" class="txtID" name="txtpd_name" value="<?php echo $pd_name;?>" /> 
                <?php echo $pd_name;?>
            </td>           
		</tr>
        <tr>
        	<td>
            	<label> * Quality:</label>
            </td>
        	<td >
                <input type="text" name="txtqty" class="txtID"  value="<?php echo $qty;?>"/>
            </td>
        </tr>
		<tr>
        	<td></td>
			<td ><input type="submit" class="btnSubmit" name="btnSubmit" value="Return" />&nbsp; 
            <input type="button" class="btnSubmit" name="btnSubmit" value="Cancel" onclick="redirect('index.php?page=sale_list&action=sale_list_detail&sale_id_detail=<?php echo $sale_id;?>')" /></td>
		</tr>
	</table>
</form>